package com.cskaoyan.controller.wxcontroller;

import com.cskaoyan.bean.pojo.Address;
import com.cskaoyan.bean.pojo.Region;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.service.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("wx/region")
public class WxRegionListController {
    @Autowired
    WxRegionService wxRegionService;

    @RequestMapping("list")
    public BaseRespVo queryRegionList(Integer pid){
        List<Region> region = wxRegionService.queryRegionList(pid);
        return BaseRespVo.ok(region);
    }
}
